package com.lzjt.domain;

import com.lzjt.domain.superdomain.SuperDomain;

import javax.validation.constraints.NotNull;
import java.util.Date;

public class Drug extends SuperDomain {
    public String getDrugName() {
        return drugName;
    }

    public String getDrugPublisher() {
        return drugPublisher;
    }

    public void setDrugPublisher(String drugPublisher) {
        this.drugPublisher = drugPublisher;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getDrugImg() {
        return drugImg;
    }

    public void setDrugImg(String drugImg) {
        this.drugImg = drugImg;
    }

    public String getDrugEffect() {
        return drugEffect;
    }

    public void setDrugEffect(String drugEffect) {
        this.drugEffect = drugEffect;
    }

    public String getDrugInfo() {
        return drugInfo;
    }

    public void setDrugInfo(String drugInfo) {
        this.drugInfo = drugInfo;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    public Long getDrugId() {
        return drugId;
    }

    public void setDrugId(Long drugId) {
        this.drugId = drugId;
    }

    private Long drugId;

    @NotNull(message="药品名称不能为空")
    private String drugName;

    @NotNull(message="药品成分信息不能为空")
    private String drugInfo;

    @NotNull(message="药品功能作用不能为空")
    private String drugEffect;

    @NotNull(message="药品图片url不能为空")
    private String drugImg;
    private Date createtime;
    private Date updatetime;

    @NotNull(message="药品发布者名称不能为空")
    private String drugPublisher;

    @Override
    public String toString(){
        return "Drug{"+"drugId="+drugId+
                ",drugName='"+drugName+'\''+
                ",drugInfo='"+drugInfo+'\''+
                ",drugEffect='"+drugEffect+'\''+
                ",drugImg='"+drugImg+'\''+
                ",createtime="+createtime+
                ",updatetime="+updatetime+
                ",drugPublisher='"+drugPublisher+'\''+
                '}';
    }
}

